home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-07-19 | 100.6 KB | 2,708 lines |
-
-
-
-
-
- TVX Reference Manual
-
-
-
- This is the Reference Manual for TVX, a full screen editor
- written in C by Dr. Bruce E. Wampler. (Current address: Dr. Bruce E.
- Wampler, University of New Mexico, Department of Computer Science,
- Farris Engineering Center, Albuquerque, NM 87131; uucp: ...{ucbvax |
- gatech | ihnp4!lanl}!unmvax!wampler). Any comments, bug reports, or
- suggestions should be sent to that address. The name TVX is derived
- from "TV" editor for any terminal ("X").
-
- This version of TVX Copyright (c) 1986, 1987 by Bruce E. Wampler
- Permission is hereby granted for free, unrestricted nonprofit use of
- this software. Please feel free to modify, distribute, and share this
- software as long as you aren't making any money from it. If you want
- to use this code in a profit making environment, please contact the
- author for permission.
-
- The current release of TVX has several different versions:
-
- 1) Standard TVX - The original version and command set of TVX.
- 2) VIX - A version of TVX that emulates the Unix vi editor.
- 3) TVX0 - A modeless version of TVX.
- 4) EMAX - A version of TVX that emulates the EMACS editor.
-
- The main part of this manual is written describing "Standard
- TVX," the version used by the author. The VIX, TVX0, and EMAX
- versions are described in appendices. While the emulator versions of
- TVX are close command set compatible versions of the original editors,
- the you should be aware that certain fundamental properties of the
- underlying TVX editor remain, and that the emulators will not work
- exactly like the originals. If you intend to use one of the other
- versions of TVX, you should read this part of the manual up to the
- section describing standard TVX commands first.
-
-
- *** General Comments ***
-
- Standard TVX functions almost identically for all versions,
- including the command set. The emulation versions of TVX have been
- written to be command set compatible with the original versions of the
- editors. It is also possible to construct a completely new version of
- TVX with a custom command set. Control codes on are normally entered
- by pressing the CTRL key and the letter key at the same time. On most
- versions, the character delete key is BACKSPACE. This character
- delete key is the one normally used by the respective operating
- system. It is up to the local implementation to notify the user of
- any variance from these conventions.
-
- Once the file has been read in, the screen will be cleared, and
- the first screenful of the file printed on the screen and the cursor
- positioned over the first character of the file. If a new file is
- being created, the message "buffer empty" will be displayed, and the
- cursor positioned in the upper left corner. TVX is then ready to
- accept commands from the keyboard. TVX works on the principle that
-
-
- -1-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- what you see is what you get. Most commands also take an optional
- numeric count. The default count is always one. Commands that allow
- a count value are preceded by the letter 'n' in the following
- descriptions. Whenever a command produces output or an error message,
- it appears on the bottom line of the screen.
-
- The BACKSPACE key (Control-H on some terminals) is used to edit
- input text. When TVX is accepting commands, BACKSPACE will cause the
- character immediately before the cursor to be deleted.
-
- TVX (all versions!) works entirely in the available memory for
- editing. The text from the file which is being edited is held in a
- buffer in main memory. If a file is particularly large, it may not
- entirely fit into main memory. The MS-DOS versions, for example, will
- allow about 50K characters, depending on the memory available. Unix
- versions will usually allow 120,000 characters and 5000 lines in one
- buffer. If the entire file will not fit into the buffer at once, then
- only part of it is read in at a time. The buffer size limit in no way
- restricts the total size of a file that can be edited by TVX. To make
- editing large files easier, some commands apply to the entire file and
- cause automatic cross buffer manipulation.
-
- Because of the internal organization of the text within the
- buffer, TVX may occasionally "compact" the tiny fragments of unused
- buffer space generated as a part of normal editing. When this
- happens, a message is displayed, and input keystrokes are remembered
- but not echoed until the compaction process is complete. The process
- may take several seconds.
-
- TVX actually divides the internal memory into two parts: the text
- buffer and the save buffer. The text buffer (or simply the buffer) is
- used to hold the file (or part of the file) being edited. There is
- only one such text buffer (unlike some other editors such as emacs).
- The save buffer is used for moving text, both from one part of the
- text buffer to the other, as well as to and from external files. The
- maximum size of the save buffer depends on the amount of text
- currently residing in the main text buffer. The following diagram
- shows the internal TVX memory organization:
-
- +-----------------------------+
- | TEXT BUFFER - the current |
- | text (or portion) of file |
- | being edited. (grows down) |
- | _________________|
- |___________| |
- | free memory ________|
- |_____________________| |
- | SAVE BUFFER - grows up |
- +-----------------------------+
-
- Text is added to the text buffer when the file is first read in
- (or created). If the file doesn't fit into one buffer, you will have
- to manually "page" the text into the buffer. Text is added to the
- save buffer in one of several ways. TVX (and emulators) have commands
- to move text from the text buffer to the save buffer, and move the
- contents of the save buffer to the text buffer. TVX also has "cut
-
-
- -2-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- mode". When cut mode is enabled, when lines are killed, they are
- automatically copied into the save buffer as well as being deleted
- from the text buffer. Cut mode is normally off for TVX, but is on for
- VIX and EMAX. It is also possible to save the contents of the save
- buffer to a new external file, and to load the save buffer from an
- external file. All versions of TVX use this scheme for handling
- text.
-
- End of lines are not special to TVX. Thus all the cursor
- movement commands and delete single character commands will treat the
- end of line as just another character. This also means that a
- <Return> (end of line) is a valid search character, and thus makes it
- impossible to end a find pattern with a <Return>. The <Escape> key is
- used to mark the end of a find pattern. All the Standard TVX wild
- cards may be used for all versions of TVX.
-
- Another basic concept of TVX is the "last thing." Whenever TVX
- finds a pattern from the search command, skips over a word, or gets
- from or puts to the save buffer, that text is considered the "last
- thing." All versions of TVX will have a command that can delete the
- last thing. While this is this a powerful editing concept, it does
- have some consequences. First, the cursor will always be placed AFTER
- the pattern just found. It also means that TVX has no delete word
- commands. Instead, the delete last thing command is used after
- skipping over a word. Using the delete last thing also makes it very
- easy to save text into the save buffer, and then deleting it after the
- desired number of lines have been saved.
-
- Probably the most powerful editing tool provided by TVX is the
- repeat loop. This allows arbitrary command sequences to be entered,
- and repeated any number of times. All versions of TVX will have at
- least 5 different repeat buffers. All emulation versions of TVX use
- the basic TVX repeat loop instead of emulating whatever macro facility
- might be provided by the original editor. (The commands inside the
- repeat loop are the emulated commands, not standard TVX commands.)
-
- Many of the basic operating characteristics of TVX are
- controllable by user settable parameters. These parameters are
- relevant to all versions of TVX, with the current status of each
- displayed on the help screen. These parameters are summarized in the
- 'set parameter' command (':') in the Standard TVX Commands section,
- but a brief overview of the parameters will also cover some of the
- capabilities of TVX (and the emulator versions).
-
- While the normal screen is only 80 columns wide, TVX has been
- written to support a "virtual" screen width of 240 columns. As you
- move the cursor right on a line that is longer than 80 columns, the
- screen will automatically scroll to the left in increments of 16
- columns. You can also control how many lines of the screen TVX uses
- using the 'v' parameter. Normally, TVX will use the entire screen.
- If you are working over phone lines, you can tell TVX to use only 5 or
- 7 lines, thus making updating much faster.
-
- TVX has some limited word processing capability. This is the
- autowrap feature, settable both when you first run TVX, and by the 'w'
- parameter. Setting autowrap to column 65, for example, will tell TVX
-
-
- -3-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- to automatically insert a newline whenever you enter text past that
- column. The 'tidy' command will use the autowrap margin to 'fill' the
- text after the fact. This feature makes it easy to make your text
- more readable, and even create good looking short memos without
- needing to resort to nroff or troff.
-
- For programmers, TVX has an autowrap command. The 'a' parameter
- controls this feature. When enabled, TVX will automatically match the
- leading white space at the beginning of the previous line.
-
- The search command also has some advanced features. By default,
- searches are case insensitive, but the 'f' parameter controls this.
- TVX also supports a set of "wild cards". You can specify a set of
- letters, numbers, alphanumerics, punctuation, or other characters as
- part of the wild cards. The 'u' parameter also allows you to define
- your own set of wild card characters. TVX remembers the last pattern
- found (the actual pattern, not just the wild cards), and has a command
- to insert that pattern into the text. Thus, with repeat loops, wild
- cards, and the insert found pattern command, it is possible to do
- quite creative editing functions. The 'm' parameter controls the use
- of wild card matching, so it can be disabled if you need to match one
- of the wild card characters.
-
- Finally, TVX has parameters to control just how the screen is
- scrolled. The home display line controlled by the 'd' parameter tells
- TVX which line to put the cursor on when the screen has been
- 'verified'. The 's' scroll window controls how many lines the cursor
- will move up and down from the home line before scrolling the text.
- If the scroll window is 0, then the cursor will be fixed on the home
- display line. By setting it to another value, you can control how
- much context remains before scrolling. These settings are very much
- personal taste.
-
- TVX uses two techniques for protecting the original file from
- editing mistakes. First, each time a file is edited, a new version is
- created, and the previous version retained in its original form as a
- backup. This file will change the original file extension to '.BAK'
- on MS-DOS systems, and '.B' on Unix. A more complete description of
- TVX file handling is included in an appendix. Also, as you edit your
- file, TVX has the capability to write all commands entered during the
- session to a log file when that capability is enabled. In the event
- of a major editing mistake, it is possible to edit that log file to
- remove the command errors, and then apply that "command" file to the
- previous version of the edited file to get back to the state right
- before the mistake. This feature also allows files of TVX commands to
- be defined by the user and executed in one step. The last section of
- the Reference Manual explains how to use the command file feature.
-
-
-
- *** RUNNING THE EDITOR ***
-
- To edit a file using TVX, enter the following command line:
-
- tvx filename -switch1 -switch2 ...
-
-
-
- -4-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- (VIX, EMAX, and TVX0 use the SAME command line format and
- switches.) The file name specified is the file to be edited, and must
- obey the conventions used by the local operating system (the MS-DOS
- version requires DOS version 2.0, and supports pathnames). If the
- file is a new file (does not exist), TVX will ask if you really want
- to create it. Answer y or n. If you gave an incorrect name, you may
- give the correct name, but the switches entered on the original start
- line will remain in effect. Control-C can be used at this point to
- abort.
-
- TVX has several switches which control certain operating
- characteristics. Each switch begins with a minus (-), and is
- separated from the file name and other switches by a blank in the
- standard UNIX/C convention. Some switches may be negated by using a
- 'nox' form. Thus, '-b' will cause a .bak file to be generated, while
- a '-nob' causes the .bak file to be deleted on exit from the editor.
- This capability is indicated by []'s. As many switches as necessary
- or desired can be used at one time in any order. A ':' may be used
- instead of a '=' for '-o'. The various switches supported include:
-
- -[no]b -- generate a .B[AK] version of the original (the usual
- default). The -nob option means no .BAK file is generated.
- This latter mode of operation follows the normal Unix
- convention of not keeping past generations of a file.
- -[no]i -- auto indent mode enabled.
- -[no]l -- generate BACKUP.LOG file.
- -o=filename -- send edited output to filename. The output file
- can also be changed at any time during the editing session
- with the ':o' command.
- -r -- read only - file can be read in only
- -s -- big save buffer - leaves more buffer for save file
- -w -- word processing mode - sets autowrap on, margin to 65.
- -x=cmds -- After reading in the file, execute the tvx commands
- following the '='. This is useful to go the the 47th line
- of the file, for example: "tvx file -x=46d".
- -z -- -z means use Control-Z to mark end of file, -noz means
- don't use. This switch is used only on MS-DOS
- implementations.
- -# -- entering a number from 3 up to the number of lines on the
- screen will create a smaller TVX editing window. This is
- most useful for slower baud rates. A -7 makes a nice, small
- window showing 7 lines.
-
- TVX is mostly a programmer's editor, and can can edit any
- standard text line file. On Unix systems, it is an alternative to
- standard editors such as ed or vi.
-
-
-
-
-
-
-
-
-
-
-
-
- -5-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- *** Summary of Standard TVX Commands ***
-
-
-
- A key to success when using TVX is to remember that there are two
- modes of operation. The normal mode is command mode. In this mode,
- all keystrokes are interpreted as commands. When you want to enter
- text, you must enter insert mode with the 'I' command. While in
- insert mode, all keystrokes entered will be inserted into the file and
- displayed on the screen. You must exit from insert mode with the
- escape key. When you enter insert mode, the message "### Insert Mode
- ###" will be displayed on the last line of the display. Also, on many
- terminals, TVX will change the cursor shape between command and insert
- mode.
-
- The modeless version of TVX (TVX0) uses the same mnemonics as
- Standard TVX for the most part. There is a 1:1 mapping between the
- commands. The modeless names for each command is included in each
- description of Standard TVX commands. Counts for any modeless TVX
- command can be entered after the escape. Thus, "<Esc>10K" will kill
- ten lines, while <Esc>10^K" will kill 10 characters.
-
- Notes: An n preceding a command means optional numeric
- argument may be supplied. If omitted n will default to 1,
- and n can be zero or negative if appropriate. '$'
- represents the escape key, and is used as a terminator for
- insert, find, and loops. Control commands are indicated
- with '^'. For example, '^K' represents Control-K, and is
- usually entered by simultaneously holding down the CTRL key
- and the K key.
-
-
- nA - Append to Save Buffer
-
- The 'A' command is used to append lines of text to the end of the
- save buffer, even if other commands have been used since the last 'A'
- or 'S' command. The append command works exactly like the 'S' command
- otherwise.
-
-
- B - Buffer beginning {TVX0: ^B}
-
- A 'B' causes the cursor to be moved to the beginning of the
- current buffer.
-
-
- ^B - Beginning of file {<Esc>B}
-
- The '^B' (Control-B) command is used to position the cursor to
- the absolute beginning of the file. The '^B' command will always
- write out the rest of the file, then re-read the first buffer full.
- This command has the side effect of making a new backup version of the
- file. It should be noted that any text saved in the save buffer will
- be preserved during this operation, so that the 'S' save command can
- be used to move text from the end to the beginning of a multi-buffer
- file. The search pattern and repeat loops are retained as well. Note
-
-
- -6-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- the '^B' file beginning is similar in concept to 'B' buffer
- beginning.
-
-
- nC - Change {^C}
-
- 'C' can be used to change characters. Entering 'nC' is exactly
- equivalent to entering 'nKI'. The command will cause 'n' characters
- to be killed, and insert mode to be entered. The escape must be used
- to terminate the insert as usual.
-
-
- nD - Down {^D}
-
- 'D' moves the cursor down n lines. The cursor is placed at the
- beginning of the new line. For convenience, the ENTER key performs
- the identical function.
-
-
- n^D - Down in column {<Esc>D}
-
- Control-D ('^D') is similar to 'D', except the cursor remains in
- the original column. Columns are defined as characters from the
- beginning of the line, so if a line has tab characters in it, the
- cursor may appear to move out of column on the screen.
-
-
- E - End of the buffer {^E}
-
- 'E' causes the cursor to be placed at the end of the current text
- buffer.
-
-
- n^E - Edit repeat buffer n {<Esc>E}
-
- When making repeat loops, it is easy to make a mistake. The ^E
- command allows any of the repeat buffers to be edited, and then the ^R
- command can save the corrected repeat buffer back. If you don't give
- a value for n, the currently selected buffer is used. If n is from 1
- to the maximum number of repeat buffers, then that repeat buffer will
- be selected for editing.
-
- The ^E command will insert the contents of the selected repeat
- buffer into the current text buffer. The repeat buffer will be
- inserted above the current text line. The repeat buffer will start
- with a sequence of '#n:<', where n will be replaced by the repeat
- buffer being edited. The '#n:' identifies which buffer you are
- editing, and is used by the ^R store repeat buffer command to identify
- the buffer to save to. Escapes will be represented by '^[' instead of
- the '$' used when entering a repeat buffer initially. A '>^[^['
- identifies the end of the repeat loop.
-
- It is possible to make as many changes as needed to the repeat
- loop. Escapes can be added by using '27i'. If you want to save the
- loop in a different buffer, you can change the number after the '#'.
- It is also important to maintain the '#n:<' start and '>^[^[' ending
-
-
- -7-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- sequences. Also, loops are limited to a maximum of 100 characters.
- You can have carriage returns within the body of a loop, too. If you
- want to create a new buffer, you can use ^E on an empty repeat buffer
- to get the required '#n:<>^[^[' loop sequence.
-
- After you have edited the repeat buffer, it can be saved with the
- '^R' command. You must place the cursor anywhere on the first line of
- the repeat buffer before using '^R'. When you press ^R, the buffer
- will be saved in the buffer indicated right after the '#'. Thus,
- unlike ^E, the ^R command accepts no n value.
-
-
- nF - Find text pattern {^F}
-
- 'F' is used to find a text pattern. When 'F' is entered, the
- message 'Find?' is echoed on the bottom line. You then enter the
- pattern to find, terminated with the escape key (echoed as $). When
- the count 'n' is positive (which is the default), find searches the
- current buffer from the current position forward. If 'n' is negative,
- then a backwards search is performed starting with the previous line.
- (Use '^F' to search across buffers). Normally, 'F' ignores the case
- of the letters in the pattern. If the ':F' parameter is set with 0,
- then 'F' command will match only the exact case. See the ':' set
- parameter command for details of the ':F' parameter. If the pattern
- is not found, "Not found" will be printed and the cursor remain at its
- original location. If the pattern is found, then the cursor will be
- placed immediately following the pattern. The pattern may be at most
- 100 characters long. If the pattern is only an escape, then the
- previous pattern will be used again (same as ';').
- TVX supports extensive wild card matching. The ':M' set
- parameter controls whether or not wild card matching is turned on.
- Normally, it is. The wild card matching in TVX is based on the
- concept of 'sets of special characters'. TVX predefines 6 sets of
- characters, and allows the user to define one additional set. When a
- special control character is included as part of the find pattern,
- then any character in the specified set will match the pattern. The
- predefined sets are:
-
- ^A - Alphanumeric characters: a-z, 0-9
- ^D - Digits: 0-9
- ^L - Letters: a-z
- ^O - Other characters: all characters except a-z, 0-9
- ^P - Punctuation: '.', ',', '!', '?'
- ^X - Any character: any printable character
- ^U - User character: any character in user set, set by ':U'
-
- Any of the sets may be specified by entering the proper control
- character in the find pattern: Control-A for the ^A set. Thus,
- entering a find pattern of '^L^D' would match any letter followed by
- any digit. Since it may be desirable to match a sequence of one of
- the character sets, two prefix characters are supported. A '^W'
- before one of the above sets will match a 'word' of that set. Thus,
- '^W^L' will match any word, and '^N^D' will match any number. The
- find pattern 'st^W^L' would match words starting with 'st'. The '^N'
- prefix is used to make a 'word' of characters NOT included in the
- given set. Thus, '^N^L' will match a 'word' of characters NOT
-
-
- -8-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- including the letters a-z. A match 'word' consists of any sequence of
- characters (at least one character long) found in the given set, up to
- the first character not in the set. End of lines also terminate all
- wild card patterns. The only real way to adequately understand TVX
- wild cards is to use them in practice.
-
-
- ^F- Find across buffers {<Esc>F}
-
- '^F' (Control-F) is the same as Find, except the search will
- cross buffer boundaries. Whenever a buffer is searched without
- finding the pattern, the next buffer will be read in. The screen will
- not change until the pattern is found or the file is exhausted. If
- the pattern is not found anywhere, then the entire file will have been
- written out, and there will be an empty buffer. The '^B' command may
- be used at that point to get back to the beginning of the file.
-
-
- G - Get saved text {<Esc>G}
-
- 'G' is used with 'S' and '^Y' to move text around. 'G' causes
- the text in the save buffer to be inserted before the current cursor
- position. The saved text remains in the save buffer. There must be
- at least one line of text in the main buffer before 'G' will get the
- text from the save buffer.
-
-
- ^G - Get killed line (unkill) {^G}
-
- The '^G' (Control-G) unkill command can be used to "unkill" one
- line, which will be the last line killed with '^K'. If the last
- command was 10^K (kill 10 lines), then '^G' will retrieve only the
- last line killed. The "unkilled" line will be inserted right before
- the current cursor position. It is also possible to move single lines
- around the text buffer using '^K' and '^G' - but be cautious. Any
- other '^K' command will reset the last killed line. '^G' can also be
- used to retrieve the entire line involved in a "'" (single quote) or
- '"' (double quote) command.
-
-
- nH - Half page {<Esc>H}
-
- 'H' is similar to the 'P' Page command. It causes the cursor to
- move down a half screenful. This will be typically be 12 lines. A
- negative count (e.g. -h) moves up a half screen.
-
-
- nI - Insert {<Esc>I}
-
- 'I' causes the editor leave command mode and enter insert mode.
- Following the 'I', all text typed in is inserted into the file until a
- terminating escape is typed. Inserted text is echoed on the screen as
- it is inserted. If any value is supplied for n (the default no n is
- not used), then only one character is inserted, and it will have the
- ascii value of n. This is the method used to enter characters that
- cannot normally be entered in insert mode, such as escape or
-
-
- -9-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- characters not on the keyboard. The message "### Insert Mode ###" is
- displayed on the bottom line when insert mode is entered (except when
- inserting on the very last line of the file). Many versions of TVX
- will change the shape of the cursor when insert mode is entered.
- {Insert is useful in the modeless version of TVX for entering either
- single characters (<Esc>nI), or when several control characters will
- be entered (e.g., ^L).}
-
-
- J - Jump back {<Esc>J}
-
- The 'J' command will cause a "jump" back to the line of the
- previous cursor position. Suppose the cursor was positioned somewhere
- in the middle of the file. If the 'E' end command was entered, the
- cursor would move to the end of the current buffer. If the 'J'
- command was then used, the cursor would return to the original line.
- It makes it convenient to flip back and forth between two points in
- the file. It is also useful if a large cursor movement command is
- accidentally entered (like when you thought you were in insert mode).
-
-
- nK - Kill Character forward {^K}
-
- The 'K' command kills or deletes characters in a forward
- direction. '1K' would delete the character the cursor is positioned
- over, and '5K' would delete the next 5 characters.
-
-
- n^K - Kill lines {<Esc>K}
-
- '^K' (Control-K) is used to kill an entire line. n=1 kills the
- current line, negative n kills previous lines, while positive n kills
- following lines.
-
-
- nL - Left {^L}
-
- 'L' moves the cursor n characters to the left.
-
-
- M - Memory and Status {<Esc>M}
-
- The 'M' command is used to display certain status information.
- The name of the file currently being edited (where the output will go)
- is displayed, followed by the version of TVX. The number of free
- characters currently available in the buffer is then given (this does
- not include characters that are free but not compacted yet), followed
- by the number of the last line of the file. Finally, the currently
- selected repeat loop buffer and maximum number of repeat buffers
- allowed is shown.
-
-
- nN - Note current location {^N}
-
- This command notes the current line location. Values of 1 to 9
- are allowed for n. After entering '3n' for example, you can then move
-
-
- -10-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- around the buffer, and later use '3^n' to return to the noted
- location. This command really remembers the current line, relative to
- the current buffer beginning. Thus if you edit out lines before the
- noted location, you will not return to the same line.
-
-
- n^N - Go back to noted location {<Esc>N}
-
- This command is used to go back to a noted location.
-
-
- nO - Open line for insert {^O}
-
- The 'O' command will cause n blank lines to be inserted, and the
- cursor positioned at the beginning of the first new line. Following
- the 'O' command, insert mode is automatically entered. The 'O'
- command is a convenient method for inserting new lines.
-
-
- ^O - Operating System call {<Esc>O}
-
- Some versions of TVX (MS-DOS and Unix, for example), will allow
- an operating system command to be executed from inside of the editor.
- For example, it might be useful to get a directory listing. On
- MS-DOS, after entering the ^O, the normal 'dir' command is entered.
- After the directory is shown by the operating system, pressing any key
- will return to the edited file.
- This command has one particularly valuable application - editing
- other files. For example, you may want to add part of another file to
- the file you are currently editing. Use the '^O' command to edit the
- other file, and create a temporary file with the part you want to
- add. Then you can use the '^Y' yank command to read in the file. For
- example: Use '^O' to get enter operating system command prompt. Then
- enter something like 'tvx otherfile -o=tempfile'. You will get a new
- copy of tvx with the otherfile being edited. Edit it to get the part
- you want. When you exit that copy of tvx, the part you want to add
- will be in tempfile. You can now yank it into the current file.
-
-
- nP - Page {^P}
-
- The 'P' commands is the same as '25D' on 24 line terminals, and
- effectively causes a new screenful to be written. It is a convenient
- method for scanning through the file. The n count argument specifies
- the number of 'pages' to scroll. Negative values for n causes reverse
- scrolling.
-
-
- ^P - Print Screen {<Esc>P}
-
- If '^P' (Control-P) is entered, and a printer is on line, the
- entire contents of the screen will be sent to the printer. Several
- consecutive sequences of "P^PP^P..." (or a repeat loop: "10<P^P>$$")
- can be used to print longer portions of the file. This command will
- not normally work on time shared systems such as Unix.
-
-
-
- -11-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- nR - Right {^R}
-
- 'R' causes the cursor to move n characters to the right. For
- convenience, the space bar is equivalent to 'R'.
-
-
- ^R - Restore repeat buffer {<Esc>R}
-
- The '^R' command will save an edited repeat buffer and delete the
- edited buffer from the text. See '^E' for a complete summary of
- editing repeat buffers.
-
-
- nS - Save text {<Esc>S}
-
- Besides the normal text buffer, TVX has a separate "save"
- buffer. This buffer can be used to move blocks of text from one part
- of the file to another. A simple 'S' command will save the current
- line in the save buffer, and move the cursor down one line. On the
- screen, 'S' appears to have the same behavior as 'D'. If n is
- supplied, then n lines will be saved. 'S' can also be used
- sequentially. If no other commands intervene, consecutive 'S'
- commands will continue adding lines to the save buffer. If any other
- commands are entered between consecutive 'S' commands, the previous
- contents of the save buffer will be lost, and replaced with the new
- line. The 'A' command can be used to append lines to the current save
- buffer without losing the previous contents.
- The '/' command can be used with 'S' and 'G' to move text. Use
- 'S' to save the text to be moved, immediately delete the saved text
- with '/', then insert it at the new place with 'G'. The last line of
- the file is can be saved in the save buffer only once, and an error
- message will be printed if you attempt to save the last line a second
- time.
-
-
- nT - Tidy text {^T}
-
- The 'T' tidy command is specifically designed to improve the
- appearance of strictly text files. When entering letters and
- documents, is it usually desirable to have the lines filled to the
- right margin. However, after editing, it is common to find a jumble
- of uneven, difficult to read source lines. The 'T' tidy command will
- fill source text using the same right margin currently set for
- auto-wrap.
- Tidy performs essentially the same operation as a word processor
- fill function. Word are combined on one line until the auto-wrap
- margin is passed. The 'n' count refers to the total number of
- resulting lines, not the number of original lines. Specifying a large
- 'n' will tidy large sections of a document. The tidy command
- recognizes lines beginning with blanks, tabs, or a period and blank
- lines as special. It will not fill those lines, thus preserving
- paragraphs, tables and NROFF-like dot commands.
- One interesting capability of tidy is to put one word per source
- line. Set the auto-wrap margin to 2, then use the tidy command. The
- result will put one word per line.
-
-
-
- -12-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- ^T - TERMINATE - ABORT EDIT SESSION {<Esc>T}
-
- The '^T' (Control-T) command aborts directly to the operating
- system. The original file is left untouched, and no backup file is
- created. This is a fairly dangerous command in that all editing
- performed will be lost (unless the '^B' file beginning command was
- used). You will be asked to confirm the '^T' command with a Y or N.
- If the '^T' is performed accidentally, the backup log file can be
- applied to the current version of the file after the '^T' has been
- edited out of the log file (no backup file will have been created
- after the '^T'). The '^T' command is most useful when you decide you
- don't want to make any changes and want to exit from TVX quickly.
- Exiting with the '^T' command is similar to using the 'R' read only
- switch at the beginning.
- If you have used the '^B' command, a work file copy of the
- original will have been written out containing all the edits performed
- before the '^B'. When you use '^T' and this work file has been saved,
- a message informing you of its existence will be printed. You can
- then either use that file, or delete it at the operating system
- level.
-
-
- nU - Up {^U}
-
- The 'U' command moves the cursor up n lines, positioning the
- cursor at the beginning of the line.
-
-
- n^U - Up in column {<Esc>U}
-
- The '^U' (Control-U) is the opposite of '^D', and moves the
- cursor up in column.
-
-
- nV - Verify the screen {^V}
-
- In regular screen editing mode, the 'V' command causes the screen
- to be rewritten. This is sometimes necessary to get a true version of
- the screen after error messages have been written or when editing
- lines longer than 80 columns. On terminals without reverse screen
- scroll, the 'V' command forces the cursor to the home display line
- (usually line 16).
-
-
- n^W - Write out buffer, read next one {<Esc>W}
-
- The '^W' (Control-W) command is used to explicitly go from one
- buffer to the next. By default, when n is >= 0, the entire current
- buffer is written to the new version of the file being edited, and the
- next buffer full of the original file (if any) is read in. If a
- negative n is supplied (any negative value, most easily -^W), then
- only the part of the buffer up to (but not including) the current line
- is written. Then as much more of the file as possible is read to the
- end of the current buffer. Thus, a negative n is useful when a file
- won't fit, and the split point is at an awkward place. It is also
- useful when a '^Y' yanked file won't fit.
-
-
- -13-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- ^X - eXit {<Esc>X}
-
- '^X' (Control-X) causes the remainder of the file to be written
- out, and the editor exited. The entire file will be written, no
- matter where the cursor happens to be positioned when the '^X' command
- is entered. This is the normal conclusion of an editing session. All
- work files are deleted, the original file renamed to the back up file,
- and the newly edited file renamed to the original name. See the
- appendix on tvx file handling conventions for more details.
-
-
- n^Y - Yank text to/from external file (file merge) {<Esc>Y}
-
- A '^Y' (Control-Y) with a positive n is similar to 'S' save, but
- the text saved in the save buffer is read in from an external file
- instead of from the current buffer. When '^Y' is entered, the save
- buffer is cleared, the buffer compactor invoked, and then the user is
- prompted for the name of the file to read. TVX then will read as much
- of the external file into the save buffer as it can. The 'G' command
- can then be used to insert the save buffer text into the current file
- at the desired location. If there is not enough room in the save
- buffer to hold the entire file, then only part of the file is read and
- a diagnostic message printed. The '-S' switch can be used when TVX is
- first invoked to reserve a large save buffer for merging larger
- files. You can also use the '-^W' command to write out the front part
- of the file, and then 'G' to get the saved file. (Note: '^Y' may not
- be used from within a log command file. See section on backup log
- file.)
- A negative n (e.g., '-^Y') can also be used with the yank
- command. If the n is negative, then the contents of the save buffer
- will be written to a new file. After '-^Y' is entered, you will be
- prompted for the name of the output file, and then the contents of the
- save buffer will be written to that file.
-
-
- nBACKSPACE - Delete previous character {BS}
-
- The BACKSPACE key will delete the previous character on the
- screen. It is also used for editing input keystrokes for Insert,
- Find, and repeat loops.
-
-
- n; - Find again
-
- The ';' (semicolon) command causes the previous pattern to be
- searched for again. This is more convenient that entering 'F$'
- again. The 'n' has the same meaning, positive searches forwards,
- negative backwards.
-
-
- / - delete last thing {<Esc>/}
-
- The '/' (slash) command is useful when used with 'F' (find), 'S'
- (save), 'G' (get), 'TAB' (word right), and '{' (word left). It causes
- the last pattern used to be deleted. Thus "Fxxx$/Iyyzz$" will delete
- the pattern 'xxx' and insert 'yyzz'. When used after an 'S', it
-
-
- -14-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- causes the just saved lines to be deleted from the text buffer (but
- not the save buffer). After the G, it causes the text just inserted
- from the save buffer to be deleted from the text buffer. After a
- 'TAB' or '{', '/' will delete the word or words just skipped over.
- Slash must be used immediately following an 'S', 'G', 'TAB', '{', 'F',
- '^F', or ';' command. This command knows how to take wild card
- matches into account.
-
-
- = - delete last thing and enter insert mode {<Esc>=}
-
- The '=' (equals) command is the same as the '/' command, except
- insert mode is automatically entered, thus achieving the effect of
- '/I' command sequence.
-
-
- ' - Delete previous part of line (single quote) {<Esc>'}
-
- The "'" command will delete all the characters in the current
- line before the cursor.
-
-
- " - Delete rest of line (double quote) {<Esc>"}
-
- The '"' command will delete from the cursor forward to the end of
- the line. The "end of line" mark will remain. Note that the single
- quote has one tick, representing the "first" part of the line, while
- the double quote has two ticks, representing the "second" part of the
- line.
-
-
- , - beginning of line (comma) {<Esc>,}
-
- The ',' command will move the cursor to the beginning of the
- current line.
-
-
- . - end of line (period) {<Esc>.}
-
- The '.' command will move the cursor to the end of the current
- line.
-
-
- * - Insert last pattern found {<Esc>*}
-
- The last pattern found with the find command (up to 100
- characters) is saved in an internal buffer. The '*' command will
- insert that pattern into the text at the current cursor location. If
- the last find pattern included wild card characters, the pattern saved
- will be the actual text matched, and not the wild cards themselves.
- You must be back in command mode to use this command.
-
-
-
-
-
-
-
- -15-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- nTAB, n{ - Skip over words {<Esc>^I, <Esc>{}
-
- The 'TAB' (TAB key, CTRL-I) and '{' commands skip over words. A
- word is any contiguous set of alphabetic characters (a-z) or digits
- (0-9). 'TAB' moves forwards, while '{' moves backwards. The 'n'
- count may be used to skip over several words at once, and a negative
- count reverses the direction of the move. A value of 0 for n will
- move the cursor to the beginning of the current word rather than the
- previous word as -{ would. Note that '{' is usually aliased to '['
- since these are often reversed case on different terminals.
-
-
- n< - begin repeat loop {<Esc><}
-
- TVX has up to 9 different repeat loop buffers which allow an
- arbitrary sequence of commands to be repeatedly executed. When n< is
- typed, the editor echoes 'Repeat: n<' at the bottom of the screen.
- The user then types in any series of commands to be repeated n times.
- The repeat command is terminated with a matching '>' and a double
- escape (echoed as $$). Repeat loops may not be nested. The repeat
- loop has two typical useful functions: one is to replace multiple
- occurrences of a string with another (e.g., "10<fone$=two$>$$"), a
- second is to save a complicated sequence of commands to be repeated as
- necessary with the '&' command (i.e., a macro facility). Each repeat
- loop may have up to 100 characters.
- When a repeat loop is entered from the keyboard, it is saved in
- one of up to 9 repeat loop buffers, each identified by an integer
- value. The repeat buffer which is currently in use can be set with
- the 'n:R' command. Buffer 1 will be used by default. The number of
- repeat buffers available and the currently active one can be
- determined by using the 'M' command. The availability of repeat
- buffers allows the definition of 'edit macros'. Commonly used
- sequences of editor commands can be saved in a given repeat buffer,
- then selected with 'n:R' and executed with the '&' command.
- For example, "3:R<fpat1$>$$" would select repeat buffer 3 and
- enter the repeat command into it (and execute the command once).
- Other "macros" could be entered in other buffers, and then the given
- example used again by "3:R&". A count 'n' of 0 can be used to enter a
- macro without executing it. The indirect command file facility ('@'
- command) can also be used to define and load commonly used macros.
- The results of using one repeat buffer from within another is not
- guaranteed, and should be tried only at your own risk.
- The '#' command has been provided to simplify the above
- sequence. Entering '23#4' for example, is exactly the same as
- entering '4:r23&'. The n value is a count, and the single digit after
- the '#' is the repeat buffer to use.
-
-
- >$$ - End of repeat loop {>$$}
-
- The repeat loop is terminated by a '>' and a double escape.
- Note: '$$' represents escape.
-
-
-
-
-
-
- -16-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- n& - execute repeat loop {<Esc>&}
-
- The '&' command executes the commands in the currently selected
- repeat buffer n times.
-
-
- n#k - execute repeat loop k {<Esc>#}
-
- This command is an easy to execute a specified repeat buffer.
- The n is a count and the k is a single digit repeat buffer number.
- This command is exactly equivalent to 'k:rn&'. Repeat buffer k
- becomes the current buffer after '#' is executed.
-
-
- n~ - change case {<Esc>~}
-
- This command changes the case of the character under the cursor.
-
-
- ? - Help {<Esc>?}
-
- The '?' command causes help screens to be displayed. There are
- two help screens. The first includes a summary of transitory values:
- a summary of settable ':' parameters, the contents of the repeat and
- find buffers, as well as buffer space left. On 16 bit processors, if
- the space left is greater than 32,000 characters, then 30,000+x will
- be shown, where the total is 30,000 plus x. The first screen also
- shows the last 16 commands you have entered. This may be useful if
- you entered "commands" while you thought you were in insert mode to
- see what your keystrokes might have done. The second screen of help
- summarizes the command set.
-
-
- @ - Invoke command file {<Esc>@}
-
- Causes a prompt for command file name. Commands in that file are
- then read in and executed. See description of backup command files
- below for details. This command is most useful for loading repeat
- macros.
-
-
- n:P - Set special parameters {<Esc>:}
-
- The ':' (colon) command is used to set several TVX
- characteristics. The value n entered before the ':' is the value to
- set the parameter to, and the character P that follows the ':' defines
- the parameter to set. Valid parameters include:
-
- n:A - set autoindent. A value of 1 turns on autoindent, 0 off.
- Autoindent is useful for programmers. When autoindent is on, each
- new line started while in insert mode will be indented to the same
- leading tab/blank space as the previous line. Use blanks or tabs
- to add indentation, and backspace to backup over indentation.
-
- n:C - set cut mode. When cut mode is enabled (1), killed lines are
- also saved in the save buffer. This works for individual kill
-
-
- -17-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- commands, e.g. 'kkk' will save only the line associated with the
- 3rd k, while '3k' will save 3 lines in the save buffer. With cut
- mode off, kill line does not save the lines in the save buffer.
-
- n:D - set home "display" line to n. The display line is the line the
- cursor homes to after a verify command. (Default home display
- line: 16 on 24 line terminals, 9 on 16 line terminals.)
-
- n:E - Expand tab value. The default value for ':E' is 8, which causes
- the tab character (^I) to be expanded to multiples of 8 columns.
- This is the standard used on most systems. Setting ':E' to 0 will
- cause tabs to be displayed as '^I' instead. Other values are
- possible, but less useful.
-
- n:F - Find case mode: n <= 0 sets find mode to search for exact case
- of pattern, n > 0 (default) set search mode to ignore upper/lower
- case.
-
- n:M - Match wild cards. (default=1). If on, then matching of the TVX
- wild card sets is enabled. If off, then the wild card control
- characters will match the actual control characters in the file.
-
- :o - set output file name. When ':o' is entered, you will be prompted
- for the name of the edited output file. This overrides the '-o'
- command line switch, and can be used to change your mind about the
- name of the edited file. If the output file name is different than
- the input file name, the input file will not be renamed to the
- backup file name.
-
- n:R - select repeat buffer n. (default=1). Repeat buffer n becomes
- the current repeat buffer executed with the '&' command. The 'm'
- status command will show how many repeat buffers are available for
- a given implementation.
-
- n:S - scroll lines: This parameter sets how many lines the cursor will
- move before the screen scrolls. The exact effect of the scroll
- parameter depends on the terminal characteristics. On terminals
- that allow a blank line to be inserted at the top, ':S' sets how
- many lines cursor will move above and below home display line
- before scrolling. Default is 0. Changing the scroll value to 4
- would let the cursor move up and down 4 lines from the home display
- line before actually scrolling the screen. Some users might find
- this update mode more pleasant to use. This will be almost
- essential on heavily loaded time shared systems. For terminals
- that do not allow a blank line to be inserted at the top (no
- reverse scroll), 'n:S' sets how many lines cursor will move above
- the home display line before the screen is rewritten. Default is
- 14, which causes the cursor to move nearly all the way to the top
- before rewriting the screen.
-
- :U - set User Wild Cards. After entering :U, you will be prompted for
- a user wild card set. You can use backspace to correct your entry,
- and '<Esc><Backspace>' to enter backspace and '<Esc><Esc>' to enter
- escape.
-
- n:V - virtual window lines. The 'n:V' will set the virtual window to
-
-
- -18-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- n lines. N must be between 3 and the number of hardware lines on
- the terminal. A smaller virtual window is extremely useful on busy
- time shared systems, or when TVX is used over a telephone line at a
- relatively slow baud rate. Typically, a virtual window of 7 or 9
- is big enough to show a reasonable part of the file, yet small
- enough to reduce the overhead of screen update at slow speeds. A
- window of 3 or 5 can even be used if needed. Note that the virtual
- window can be set at start up time by using the '-#' switch. The
- virtual window will use the top n physical lines of the display.
- Error messages and prompts will still be displayed on the bottom
- physical line. Scanning up with 'u' will cause the lines to be
- scrolled onto the unused part of the screen, and gives a true
- picture of the file showing more lines than the window size.
-
- n:W - set auto wrap width. The ':W' parameter sets the column number
- used for auto wrap mode. When the auto wrap is set to a value
- greater that 1, TVX will automatically insert an end of line when
- the user types the first blank after the given column. Normally,
- the user must manually hit the RETURN key to force an end of line.
- The auto wrap mode allows continuous entry of text without worrying
- about the right margin. A good value to use for ':W' is 10 columns
- less than the screen width (70 on 80 columns screens).
-
- An invalid parameter value or name causes an error message.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -19-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- *** BACKUP LOG FILE FEATURE ***
-
- TVX has a backup log file feature. When the feature is enabled,
- all commands entered in any given session are saved on a file called
- "BACKUP.LOG" on the current directory or drive. If for some reason
- you destroy your file during an editing session (like accidentally
- entering "100^K" instead of "100K"), you won't have to manually
- re-edit the backup version of the file. (By default, the log file is
- disabled. The 'L' invocation time switch will respectively disable or
- enable the log file feature.)
-
- The "BACKUP.LOG" file contains all the commands you entered in
- the last session. Most commands will appear in the log file as you
- entered them: R, U, D, etc. However, all control characters,
- backspace, and the atsign are encoded in the log file to make them
- appear as printable characters. The atsign '@' is used as an encoding
- character. So, for example, tabs appear as '@I', escapes as '@[',
- RETURNs as '@M', and so on. Control-A would appear as '@A'. The '@'
- itself would appear as '@@'. Backspace appears as '@H'. These escape
- sequences may be split across the end of a line in the log file. The
- end of line marks in the log file are not part of the command stream
- and are ignored.
-
- The procedure for using the "BACKUP.LOG" file to restore your
- file is as follows. When you realize you have made a mistake, enter
- the '^X' exit command. Copy "BACKUP.LOG" to a temporary working
- file. Now edit that temporary version of the log file to remove the
- mistakes, which should be near the end of the file.
-
- Once the log file has been edited to remove the bad commands, you
- should then re-edit the original file (the one without the mistakes).
- The latest version of the file will be the one with the mistakes, and
- should usually be killed. Start TVX and read in the file. Then enter
- the '@' command and supply the name of the "repaired" log file. All
- the commands in that log file will be applied to the original file.
- You should be careful to start the '@' command when the cursor is at a
- specific place such as the beginning of the file. After the '@'
- command is finished, your file will be in the same shape it was before
- the mistake.
-
- For example, suppose you are editing a file called "MYFILE0.TXT"
- and that you accidentally kill 100 lines. When you realize your
- mistake, you enter '^X' to exit. Then you should copy or rename the
- BACKUP.LOG file to a new temporary file - say FIX.LOG. The current
- version of the file you were editing is the bad file and should be
- deleted. On CP/M and MS-DOS versions, you would rename MYFILE0.BAK to
- be MYFILE0.TXT again. Then, edit FIX.LOG to remove the command that
- killed 100 lines and the quit command ("100@K@X"). Exit again, and
- re-edit MYFILE0.TXT. If you then enter the '@' command, and respond
- with FIX.LOG as the name of the command file, your file will be
- brought back to the state it was in right before the '100^K'.
-
- There are some special cases that require special attention when
- using the backup log file. These cases involve the entry of file
- names or strings, such as for '^Y', ':o', and ':u'. For 'Y', the file
- read as a part of the given command is read using the same I/O channel
-
-
- -20-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- as the backup log file input, and thus both cannot be used at the same
- time. If the backup log file contains any '^Y' commands (displayed in
- the log file as '@Y'), you must remove them. Obviously, this will
- alter the order of the commands in the file, and you will need to use
- a special procedure. Suppose, for example, that the backup log file
- contained one '^Y' command. Make two copies of the backup log file.
- Edit the first, and remove all commands following the '^Y' command,
- including the '^Y' command. Then edit the other copy, and remove all
- commands before the '^Y', including the '^Y'. Then, edit the backup
- copy of the original file. First, apply the first backup log file.
- This will get you to the point right before the '^Y'. Then without
- changing the cursor position, manually enter the '^Y' command and file
- name. Finally, apply the second copy of the backup log file.
-
- For ':o' and ':u', the filename or user set are not save as part
- of the log file, and you will in fact be prompted for the file name or
- user set while the log file is being executed. There is no real clean
- way around this.
-
- It is also possible to write log command files of your own to
- carry out specific commands. This allows the creation of "macros"
- that can be executed as needed. When creating log files of your own,
- you should remember that control characters and backspaces must appear
- as encoded characters. The '@' is the encoding character. Control
- characters will appear as '@' followed by the appropriate letter: '^I'
- = '@I', enter = '@M', etc. An '@' itself is '@@', and backspace is
- '@H', although you should never need a backspace in your own files
- (use -K).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -21-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- *** Error Messages ***
-
- *** Abort, are you sure?
- This message is displayed after the "abort" command has been
- entered. A reply of y or Y will cause the session to be terminated.
-
- *** Bad O= switch
- An incorrect format was specified for the O= switch.
-
- *** Bad @ name
- An invalid file name was specified. Re-enter.
-
- *** Bad command: x
- The command is not a valid TVX command.
-
- *** Bad file name
- An invalid file name was specified. Re-enter.
-
- *** Bad output file: filename
- An invalid output file was specified.
-
- *** Bad par (val | name)
- An invalid value or parameter name was specified.
-
- *** Bad rpt buff #
- An invalid repeat loop number was entered.
-
- *** Bad switch
- An invalid switch was specified. Re-enter file name and
- switches.
-
- *** buffer empty
- Information message. Displayed after a new file has been
- created, or when the write buffer command is executed and the text
- buffer is empty.
-
- *** Can't create new name
- TVX was unable to create a new name for the output file. Free
- some disk space, rename the file, try again.
-
- *** Can't insert that
- There are three values that TVX uses internally, and thus are not
- valid as user inserted characters in the text buffer.
-
- *** Can't save last line twice!
- The last line of the buffer can only be saved once. (That
- applies to the other lines, too, but the last line is a special case.)
-
- *** Can't :o, R/O
- It makes no sense to set a new file name when the file is read
- only.
-
- *** Can't, buffer empty. Insert 1st
- Most TVX commands are not valid until some text has been inserted
- into the buffer.
-
-
-
- -22-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- *** Can't: R/O
- File beginning is illegal when the file is read only.
-
- *** Compacting buffer
- Information message. Displayed when TVX is compacting the
- buffer. The compaction process may take several seconds.
-
- *** Compacting done
- Information. The compaction is complete.
-
- *** Compactor lost: quit now!
- An internal error has been discovered. Exit TVX immediately, and
- preserve the backup copy. Try the session again.
-
- *** Create? (y/n)
- The file name specified does not exist. A y answer will cause
- the file to be created. A n answer will allow the file name to be
- respecified.
-
- *** Error reopening
- Something has gone wrong with the 'File beginning' command.
- Exit, and try editing the file again. Be careful since an empty file
- may have been created.
-
- *** File only part read
- There was not enough room in the save buffer to hold the entire
- external file specified in the 'merge' command. Try re-editing using
- the 's' big buffer switch.
-
- *** Line no longer there
- Return to noted location can't work because the noted line has
- been deleted.
-
- *** lines filled
- TVX has run out of room to add more lines. Use the 'write
- buffer' or 'file beginning' command to get more space for new lines.
-
- *** no get room
- There is not enough room in the text buffer to insert all the
- text in the save buffer. Use the 'file begin' or 'write buffer'
- commands, and try again. The '-^W' command is often useful.
-
- *** no more lines for insert
- See "lines filled".
-
- *** no nesting
- TVX does not allow nested repeat loops: "<<..>>".
-
- *** no save room
- There is not enough room left to save any more text in the save
- buffer. Try saving smaller blocks, or use the 'file begin' command to
- get more space.
-
- *** No more free lines for insert
- The maximum number of lines have been used. Write the buffer
- before inserting more new lines.
-
-
- -23-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- *** not found
- The current find pattern was not found.
-
- *** Not a valid rpt buff
- The current line does not contain a valid repeat loop for the ^R
- restore command to use.
-
- *** reading file...
- Displayed while TVX is reading in the file.
-
- *** rename fails
- Something has gone wrong with the 'File beginning' or 'quit'
- commands. On timeshared systems, this may mean you didn't have write
- capability for the file. The work file will probably be retained, and
- can be manually renamed or copied using standard operating system
- commands.
-
- *** search fails
- A cross-buffer search has failed to find pattern.
-
- *** Save buffer empty!
- Tried to write to a file when save buffer empty.
-
- *** Unable to open external file
- An invalid name was specified.
-
- *** Unable to open yank file
- An invalid name was specified.
-
- *** writing buffer
- Displayed when the buffer is being written out.
-
- *** writing partial buffer
- Partial buffer only, as caused by the '-^W' command.
-
- *** Yank filename:
- Enter the name of the file you want to read into the save
- buffer.
-
- *** 100 chars only
- At most, 100 characters are allowed in each find pattern and each
- repeat loop.
-
- *** <> not complete
- The repeat loop has terminated before the specified number times
- have been executed. This is usually what you wanted, and can be
- caused by failing to find a pattern, or reaching the end of the
- buffer. An invalid command or other error will also cause a repeat
- loop to terminate.
-
-
-
-
-
-
-
-
-
- -24-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- *** INSTALLATION OF TVX ***
-
- If you have the C source code of TVX, this section has some notes
- you should find useful if you recompile the code to customize TVX for
- your system. It should also be helpful if you are installing TVX on a
- new system. If you are just a user, then you can ignore this
- section.
-
-
- *** General Comments ***
-
- TVX has been designed to be portable. It has had versions
- running under CP/M-80, MS-DOS, GEMDOS, RT-11, RSX-11, VMS, and Unix
- BSD 4.2. The heart of TVX portability is the terminal driver. For
- dedicated systems, the control codes used by a specific terminal are
- hard wired into C global variables and a terminal specific version is
- compiled. It has been customary to give a unique name to each
- different version such as TVV for a VT-52 version, TVT for a televideo
- version, etc. The Unix 4.2 BSD version of TVX has been written to
- take advantage of the TERMCAP library usually provided, and is thus
- terminal independent.
-
- Since terminals differ widely, TVX tries to update the screen as
- best as possible using the control codes available. The minimum set
- of control sequences required by TVX include direct x-y cursor
- positioning, and erase from cursor to the end of the current line.
- Almost all terminals have at least these two controls. The only known
- terminal widely available that does not have both of these is the
- ADM-3a. Thus, TVX will NOT work on ADM-3a's. Another desirable
- control sequence is the ability to insert a blank line at the top of
- the screen (reverse scroll). This allows TVX to scroll rather than
- jump from one screen to the next. However, TVX will perform
- adequately even on terminals with only x-y and erase to end of line.
- It has also been found that TVX does not always work on terminals with
- multiple pages of screen data. The scroll bottom line command usually
- fails.
-
- *** Quick and Dirty Porting ***
-
- It should be very simple to port TVX to a new machine for a
- specific terminal. The only "hard" part comes when trying to use a
- package like TERMCAP. Then, the 4.2 Unix code can serve as a guide.
- In effect, what that code does is get the screen controls and patch
- the regular TVX screen control locations.
-
- Typically, however, it should be almost trivial (assuming a
- fairly standard C implementation - the current code compiles unchanged
- on 4 different C compilers) to generate a version of TVX for a
- specific terminal. The main steps:
-
- 1. Define the control codes for the terminal. These are
- explained in some detail in the manual.
-
- 2. Fix file I/O calls. This may take no changes at all. The
- main issue has been the mode argument to fopen. TVX likes to get the
- file raw - with NO end of line handling by the C I/O system. These
-
-
- -25-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- things are identified by #define's in tvx_defs.ic. The other issue is
- what is the end of line character. Unix likes LF only, while MS-DOS
- and descendants like CR/LF (actually DEC RT-11 descendants). The
- #define FILELF and NEWLINE handle this.
-
- 3. The last issue is getting characters to and from the
- terminal. These are isolated in tvx_io.c. The critical routines:
-
- ttrd() [ and ttrd_() ]: This reads one character (ANY possible
- character, except possible ^S and ^Q) from the terminal, UNECHOED.
- The routine ttinit is called to possibly initialize things, and ttclos
- at the end to undo whatever ttinit did.
-
- ttwt() and ttwtln(): These are used to send characters to the
- screen. ttwt sends a single character, immediately and unbuffered.
- ttwtln can be based on ttwt, but is provided and used whenever a chunk
- is available to write. This is essential on busy time shared
- systems.
-
- That's really the only problem areas. One good thing to do when
- porting is to find all the uses of #ifdef (and #ifndef) for the
- implementations described: MSDOS, UNIX, GEMDOS. Those certainly
- identify the areas most likely to be different on your system.
-
-
- *** Source Files Supplied ***
-
- The following files are included in most distributions:
-
- TVX_1.C - main part of code (part 1)
- TVX_2.C - main part of code (part 2)
- These two files are mostly os and terminal independent.
- TVX_EDIT.C - The main heart of the command parser. Isolated to
- make generating new emulators easy. When generating
- a new emulator, only TVX_EDIT and TVX_LEX need to
- be recompiled.
- TVX_LEX.C - defaults, some os dependent stuff in here. Major
- changes in defaults can be fixed by recompiling this file.
- TVX_IO.C - almost all I/O, including screen, confined to this file.
- TVX_LIB.C - misc library routines needed by TVX.
- TVX_IBM.C - IBM-PC specific code, specifically the screen driver
- (TVX_IBM.ASM - hand optimized version of TVX_IBM.C)
- TVX_UNIX.C - contains unix specific code, including termcap driver
- TVX_DEFS.IC - #define's for version, os, terminal, defaults
- TVX_GLBL.IC - global data structures
- TVX_TERM.IC - definitions for various terminals and systems
-
- TVX_MAKE.BAT - MS-DOS Batch file to build TVX using Microsoft C Vers 4.0.
- TVX_MAKE.UNX - Unix Makefile to make on unix.
-
- TVX_REF.DOC - This file, preformatted for printing on a "standard"
- printer - 80 columns by 66 lines.
- TVX_TUT.DOC - A novice user tutorial for using Standard TVX.
- xxx.ref - a quick reference card for given version of TVX.
-
-
-
-
- -26-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- *** Screen Driver and Control Sequences ***
-
- The actual codes used by TVX to update the screen are global
- variables in the 'tvx_glbl.ic' file. Using the '#ifdef EXTERN' trick
- described in that file, the screen variables (plus most other relevant
- global variables) are included as external references. The actual
- definitions for a given terminal are included in a file called
- 'tvx_term.ic'. Several sample definitions are included in the
- distribution code. A description of each relevant variable follows:
-
-
- ** X-Y Cursor Addressing
-
- int addx - amount to add to internal x position get terminal's x
- value. Terminals typically encode x-y as a single printable
- character, thus requiring the addition of a blank to make x-y
- printable. Since TVX uses a 1,1 origin, this value will commonly be
- 31.
-
- int addy - same as addx, but for y position.
-
- char cxychr - true (1) if convert xy binary representation to ascii
- string.
-
- char cxy1st - 'l' if line coordinate first, 'c' if column first.
-
- char cxybeg[8], char cxymid[8], char cxyend[8] - The x-y cursor
- control sequence usually takes one of two forms: <control><x><y> or
- <control><x><middle><y><end>. The x and y may be reversed. These
- three arrays are used to send the proper control sequence for xy
- positioning.
-
-
- *** Other control sequences
-
- char cversn[12] - a version string to identify terminal.
-
- char cerrbg[8], char cerred[8] - sequences sent when an error message
- sent to terminal's last line. Note that cerrbe is sent BEFORE the
- cursor is moved to the last line, and cerred is sent before the cursor
- is returned to the original position. Some terminals give problems if
- a highlight sequence is sent before a cursor positioning sequence. A
- bell is usually safe for most versions.
-
- char ctopb[8] - This sequence should insert a blank line when the
- cursor is at the top left corner. It is often called reverse line
- feed. A command to insert a line usually performs the same function,
- but some terminals don't have both.
-
- char cinit[20], char cendit[20] - these sequences are sent to
- initialize and reset the terminal.
-
- char cbotb[8] - this sequence scrolls the screen up one line when the
- cursor is on the last line. Line feed works for any terminal
- encountered to date.
-
-
-
- -27-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- char celin[8] - Erase from cursor to end of line. This sequence is
- required for operation of TVX.
-
- char cescr[8] - Erase from cursor to end of screen. If the terminal
- doesn't have this, it is simulated using multiple celins.
-
- char ccsrcm[8], char ccsrin[8] - These are used to change the cursor
- from command mode to insert mode. Many terminals do not support a
- method of changing the cursor shape. These have been also been used
- to change the screen from normal to reverse video and back.
-
- char ciline[8] - Insert a blank line. A blank line is inserted on the
- line the cursor is on. If available, it can be used for ctopb, too.
-
- char ckline[8] - Kill a line. The line the cursor is on is deleted,
- and the following text scrolled up.
-
- char cundlb[8], cundle[8] - TVX has the capability to optionally
- support bold and underline for some text processors. For example, a
- ^U can be used to toggle underscore. This is only useful for a text
- formatter that can recognize such a sequence.
-
- char cboldb[8], char cbolde[8] - Similar to undlb, but boldface.
-
-
- *** Default settings
-
- int ddline - default display line. This sets which line is the
- default home display line. For scrolling versions (dscrl != 0), right
- in the middle is a good place. For fixed cursor line versions,
- something below the middle seems better (like 16 for 24 line
- screens).
-
- int dscrl - default scroll lines. If this is non-zero, the cursor
- will move up and down lines on the screen with cursor movement
- commands. This requires a bit less screen update overhead, and is
- better for slower time shared systems. If it is zero, the cursor will
- remain fixed on ddline, and text will scroll on and off the screen as
- needed. Both these are resettable with the : command.
-
- int dxcase - default search case. 0 means find is case insensitive, 1
- means find must match exact case.
-
- int usecz - MS-DOS versions only. If 1, TVX will put a Control-Z end
- of file mark in the file (this is CP/M compatible). If 0, TVX uses
- MS-DOS end of file conventions.
-
- int autoin - TRUE (1) if auto indent, FALSE (0) otherwise.
-
- int logdef - Create backup log file by default? 0->no, 1-> yes.
-
- char wildch - The character used as a wild card in finds.
-
- char delkey - the delete character key, usually backspace.
-
- int tvhardlines - number of physical lines on screen.
-
-
- -28-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- int tvlins - number of lines on virtual screen. Initially should be
- same value as tvhardlines.
-
- int tvcols - number of columns on screen. If the terminal wraps new
- text to the next line rather than discarding characters after the last
- column, then tvcols must be set to 1 less than the true width of the
- terminal.
-
- int isibmpc - TRUE (1) if this version uses the custom IBM-PC screen
- driver. FALSE (0) if uses regular terminal output code.
-
- char synofr[20], char synoto[20] - These are used to map commands.
- The synofr contains commands to be aliased to the corresponding
- command in the synoto table. For example, the '[' and '{' keys are
- often reversed on some terminals. Making '[' in synofr a synonym to
- '{' in synoto will make the two commands the same.
-
- char funkey - If the terminal has function keys, they can be supported
- by TVX by setting this variable to the first code sent by the function
- key, usually ESCAPE. TVX supports only two code sequences for
- function keys.
-
- char funchar[50] - this is the second code sent by a function key.
-
- char funcmd[50] - this is the equivalent command a given function key
- will be mapped to. Similar to synofr and synoto.
-
-
- *** #define options
-
- The file 'tvx_defs.ic' has many #define statements that can be
- used to customize TVX for particular installations. Ideally, the
- source for TVX should be maintained as one set, and differences
- between versions handled by #defines. Most #defines are explained in
- the source code, but a few deserve a few extra comments, and are
- summarized below.
-
- #define VERSION " - TVX (7/1/85) - " - This defines the version of
- TVX. Any time a modification is made, the VERSION define should be
- updated.
-
- #define VB - whether or not to create backup log version or not. This
- does NOT imply the file "backup.log" will be used automatically (see
- variable logdef), simply that the code is included.
-
- #define ULBD - If defined, TVX supports underline, bold in ^U, ^B
- format.
-
- #define BACKUPNAME - This defines the name of the backup log file, if
- used.
-
- #define BUFFLIMIT - This defines how much space is saved in the text
- buffer when reading in a file. This determines how much space is
- reserved for saving text with the 'S' command, and how much is left
- over for new inserts. Smaller values allow more text from the file to
- be read, larger values allow more text to be saved. The '-s' switch
-
-
- -29-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- at runtime increases this value.
-
- #define FILEREAD, #define FILEWRITE - These define the string used for
- file mode in the fopen() calls. Unix and MS-DOS versions are not
- typically exactly compatible, as most MS-DOS C's allow a different
- mode to handle the CR/LF problem.
-
- #define FNAMESIZE - maximum length of file names.
-
- #define INT16 - If #defined, then the normal C int is 16 bits long.
- This changes the way memory status is displayed.
-
- #define LINELIMIT - Like BUFFLIMIT, only number of lines.
-
- #define MAXBUFF - Defines maximum number of characters allocated to
- text buffer. Malloc() is used to get the space from the runtime
- system. It is possible less than MAXBUFF will be available. The
- maximum allowed for any given system must be less than the maximum
- value represented by an unsigned int. If MAXBUFF is very large, there
- get to be a noticeable initialization delay.
-
- #define MAXLINE - This determines the maximum number of lines
- allocated per buffer. It is related to MAXBUFF.
-
- #define REPEATBUFS - defines how many repeat buffers are allocated.
- If space is a problem, allocate fewer repeat buffers.
-
- #define USELF - This symbol should be defined if the terminal needs a
- line feed character after each carriage return. Almost always true.
-
- #define FILELF - This symbol is defined if text files use a CR/LF
- combination. It causes a NEWLINE/LF to be written to files.
-
- #define NEWLINE - This defines the actual character used as a new line
- in files. On CR/LF systems, it should be a CR (13). On systems like
- Unix with a single new line separator, it should be that character
- (LF).
-
- #define USECTRLZ - defined if the code for handling a Control-Z and
- end of file mark should be used.
-
- #define NEEDTVLIB - define this if the standard C library provided
- doesn't have the routine in TVX_LIB.
-
- #define HELP - Define this if help should be supported. The help
- routine uses significant space, which can be saved if help isn't
- compiled in.
-
- #define CONFIGFILE - define this if support for the '-c' switch is
- desired.
-
-
-
- **** MS-DOS Notes ***
-
- TVX can be built as a generic MS-DOS version and as an IBM-PC
-
-
- -30-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- specific version. The MS-DOS version uses the standard DOS character
- output routines. Thus, it could use the ANSI.SYS driver, but it would
- run very slowly then. The IBM-PC version has a custom screen driver
- that calls the ROM BIOS directly, and is very fast. Even more speed
- can be had by optimizing the output assembly code (the sysint
- overhead). The definitions for and IBMPC included in "tvx_term.ic"
- also define the keypad keys to work in a predictable manner.
-
-
-
- *** Unix Notes ***
-
- The usual Unix version will be the TERMCAP version. That version
- works very well, but is not in all cases optimal for a given
- terminal. It might be desirable to build a specific version for the
- terminal you use most often. Most notably, the TERMCAP version does
- not know about cursor shapes or other control sequences to distinguish
- command mode from insert mode. Also, it sets tvcols to one less than
- the true value to avoid wrapping problems. The termcap version also
- only sends a bell for the error message.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -31-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- *** TVX File Usage ***
-
- TVX uses four logical files: the original file, the destination
- file, a work file, and the source file. The original file and the
- destination file are not touched until a normal exit from TVX.
-
- The source file is the current copy of the file providing text to
- be entered. When TVX is first started, the source file and the
- original file are the same. The work file is used to hold the edited
- output file.
-
- When the '^B' file beginning command is issued, the remainder of
- the source input file is written to the work output file. The work
- file then becomes the new source file, and a new work file is
- created. Thus, it is possible to have four copies of a file around:
- The .BAK backup copy of the original file, the original copy of the
- file, the copy of the source file, and the (partially written) work
- file. Under normal operation, there will only be two copies: the
- source file (which is really the original file) and the possibly
- partially written work file. Only by using the '^B' commands can 3
- copies of the file exist.
-
- When you issue the normal '^X' exit command, the following
- actions take place: Any old .BAK files are deleted. The original file
- is renamed to be the new .BAK version. If the source file is
- different than the original file, it will be deleted. The work file
- is then renamed to be the destination file. If you don't have write
- access to the directory with the original file, then the original file
- and the work file will not be renamed. A message to that effect will
- be printed. The normal operating system copy and rename commands can
- be used to recover the work file, which contains the edits made to
- date.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -32-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- *** Standard Quick Reference Summary ***
-
-
- TVX Commands (n => count allowed)
-
- nA Append lines B Buffer beginning
- ^B File beginning nC Change chars
- nD Down line n^D Down column
- E Buffer end n^E Edit repeat buffer
- nF Find pattern ^F Find across buffs
- G Get save buffer ^G Unkill last line
- nH Half page nI Insert (till $)
- J Jump back nK Kill character
- n^K Kill line nL Left
- M Memory status nN Note location
- n^N Reset location nO Open blank line
- ^O Operating system nP Page
- ^P Print screen nR Right
- ^R Restore edited buffer nS Save lines
- nT Tidy (fill text) ^T Abort session
- nU Up n^U Up column
- V Verify n^W Write buff
- ^X Exit, end session n^Y Yank to(-n)/from(+n) file
- nBS Delete prev. char. n; Find again
- / Delete last thing = Change last thing
- ' Del to line beginning " Delete to line end
- , Line beginning . Line end
- nTAB Word right n{ Word left
- n<>$$ Repeat loop n& Repeat again
- n#k Execute repeat buffer k n times
- ? Help @ Invoke cmd file
- * Insert pat found last n~ Toggle case
- $ Escape - end insert, find, repeat
- n:p Set parameter p
-
- Possible parameters:
-
- A - Autoindent (1=y,0=n) D - display line
- E - Expand tabs to n spaces F - find case (0=exact,1=any)
- M - Match wild cards O - set output file name
- S - scroll window R - repeat buffer to use
- U - define user wild card set V - virtual window
- W - autowrap width C - cut mode
-
- Usage: tvx filename [-b -i -l -o=f -r -s -w -# -x=c {-z}]
-
- -[no]b : backup file -[no]i : autoindent
- -[no]l : make command log file -x=commands : execute cmds
- -o=outputfile -r : read only
- -s : big save buff -[no]w : word processing mode
- -# : set virtual window lines to #
-
- On MS-DOS versions:
- -[no]z : use control-z for end of file
-
-
-
-
- -33-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- VIX - A vi-like editor based on TVX
-
-
- Vix is an extension to tvx that provides a close emulation of the
- Unix editor vi. While the majority of the common commands are
- identical, there are some inherent differences in the way tvx and vi
- treat text. Most of the commands were implemented directly using the
- TVX equivalent, although some commands were required new code. If the
- vi command could not be implemented, its command letter was left
- unused, and will produce an error message.
-
- Vix does not have the underlying ex editor, so none of the escape
- to ex commands work. Vix does have the TVX repeat loop, however, and
- this compensates to a great extent for the need for ex features.
- Please consult the TVX manual for examples of using the repeat loop.
- Note that when using the repeat loop with vix, the commands will be
- vix commands and not tvx commands.
-
- Another significant difference is that tvx (and thus vix) treats
- the end of line character as just another character. Thus cursor
- movement commands move over the end of line in a fashion one would
- expect. However, when one moves to the end of the line, the cursor is
- placed 'over' the newline (displayed after the last real character in
- the line). This makes the '$' command work somewhat differently.
- This also means that you can include a <return> in a search pattern.
- Vix and tvx use ESCAPE to end the search pattern instead of <return>.
-
- Vi uses the ':' command to read and write the file (among other
- things). Vix uses the ':' to set operating parameters such as
- autoindent, screen size, etc. The 'ZZ' (or 'ZA' to abort without
- changes) command is used by vix to exit.
-
- Unlike vi and ex, tvx and vix try to load the entire file being
- edited into memory (called the buffer by tvx/vix, as opposed to the
- yank or save buffer). If the entire file doesn't fit, the user must
- manually 'page' the file in and out of memory manually. Most of the
- 'q' ("tvx" prefix) commands are supplied to handle buffer
- manipulation. For more details, consult the TVX manual. TVX/vix also
- uses the concept of the "last thing" as a major editing tool.
- Whenever you find a pattern, skip over a word with b or w, save text
- into the save buffer with the 'y' or 'Y' commands, or put text from
- the save buffer, that text is considered the "last thing". The 'c/'
- and 'd/' commands will delete the last thing. Entering a new command
- will forget what the last thing was until you again enter a "last
- thing" command.
-
-
-
-
-
-
-
-
-
-
-
-
-
- -34-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- The available vix commands are summarized below. The first
- column of each entry has a character noting similarities and
- differences with the real vi commands in the following fashion:
-
- - means present in vi, not implemented in vix.
- = means commands work identically {with possible minor variations}
- + means new or significantly different command
- * means "equivalent" command, somewhat different than vi
- <space> means command unused in both vi and vix.
-
- n in front of command means command takes count argument
- [synonyms indicated in brackets]
-
- ^@: Unused
- ^A: Unused
- = n^B: Backward window. {2 lines of continuity not preserved}
- ^C: Unused
- = n^D: Down half window.
- - ^E: Not implemented
- = n^F: Forward window.
- * ^G: memory status, short info line
- = n^H: backspace Command mode: left; Insert mode: del last char
- = ^I: inserts tab in insert mode, not a command.
- = n^J: down arrow in column [j,^N]
- + n^K: up in column [k,^P]
- = ^L: verify screen [^R,z]
- = n^M: down to beginning of line [+]
- = n^N: [j, ^J]
- ^O: Unused
- = n^P: [k, ^K]
- = ^Q: Unused (flow control)
- = ^R: Redraw screen [^L,z]
- = ^S: Unused (flow control)
- + ^T: TVX prefix command - see q [q,Q,T]
- * n^U: Up half window. ** in insert mode, does NOT erase line **
- * ^V: Not a command. NOT literal quote in insert mode.
- * ^W: Not a command. NOT used for delete word in insert.
- ^X: Unused
- - ^Y: Not implemented
- - ^Z: Not implemented
- = Escape: forces command mode, safe follow char for d,c,q.
- ^: Unused
- - ^]: Not implemented
- - ^^: Not implemented
- ^_: Unused
- = <space>: [r]
- + n!: Tidy. Fills n lines up to wrap margin. [see autowrap]
- - ": Not implemented
- + n#p: execute repeat loop number 'p' 'n' times
- = $: goto end of current line {end is newline, not last char}
- - %: Not implemented
- - &: Not implemented
- - ': Not implemented
- - (: Not implemented
- - ): Not implemented
- + *: insert last matched pattern into text buffer
-
-
- -35-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- = n+: [CR, ^M]
- - ,: Not implemented
- * -: Used in vix for negative counts, use K for up line.
- - .: Not implemented, repeat loops are a substitute
- = /: search {Escape used to end pattern, multi-line patterns ok}
- * 0: 0 is used for counts (especially for : parameters)
- = 0-9: count value for numeric arguments {may be negative!}
- - :: Not implemented - use ZZ and ZA to exit
- - ;: Not implemented
- + n<: Begin repeat loop. Loop terminated with >$$. ($ = Esc)
- + =: Help screens
- + >: Used to terminate repeat loops.
- = ?: Reverse search {search begins on previous line}
- + n@: execute current repeat loop n times (shorthand for n#p)
- = A: append to end of line
- * nB: back a word {vix's concept of words is different than vi}
- = C: changes rest of line
- = D: delete rest of the line
- - E: Not implemented
- - F: Not implemented
- = nG: goes to line number n, or end of buffer if no n supplied
- * H: Beginning of buffer (first line in buffer)
- = I: inserts at beginning of line
- = J: join lines {not needed since vix treats newlines as chars}
- + nK: Up a line to beginning of line
- * L: bottom line of file
- + nM: return to marked location n (n from 1 to 9, see m)
- = N: like n, but in reverse direction
- = nO: open a line above current line. n opens n blank lines.
- = P: put save buffer above current line {save buffers not named}
- + T: tvx commands (see q) [^T,q,Q]
- * U: very limited undo!! It only restores the LAST line killed!
- V: Unused
- * nW: Moves forward n words [w] {vix's concept of words not same}
- = nX: delete n characters before cursor
- + nY: append n lines to save buffer (see y), does not change buffer
- =+ Zx: exit from vix (ZZ: normal, writes file, ZA: abort, no changes)
- - [[: Not implemented
- : Unused
- - ]]: Not implemented
- = ^: beginning of line {1st char of line, NOT 1st non-white char}
- + _: invoke indirect command file
- = a: append text starting after cursor
- * b: back up a word [see B]
- = c: change c, <sp>, ^, $, or / (delete, enter insert mode)
- = c - change line
- = <sp> - change one character
- = ^ - to beginning of line
- = $ - to end of line
- - w, b, and any others not mentioned not implemented
- + / - the last thing found, yanked or put
- = nd: delete d, <sp>, ^, $, or /
- = d - delete line
- = <sp> - delete character
- = ^ - to beginning of line
- = $ - to end of line
-
-
- -36-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- - w, b, and any others not mentioned not implemented
- + / - the last thing found, yanked or put
- - e: Not implemented
- - f: Not implemented
- g: Unused
- = nh: Move left n characters [BS,^H] {will move over lines, too}
- = ni: insert (if value n supplied, then that ascii code inserted)
- = nj: down lines, in column [^J,^N]
- = nk: Up lines, in column [^K,^P]
- = nl: right n characters [<space>] {moves over lines, too}
- * nm: mark cur. line as location n. Use M to return to location.
- = n: find next (in same direction as last ? or /)
- = no: open n following lines
- = p: put save buffer after cur line
- + q: Prefix character for "tvx" extended commands
- !: call operating system
- b: goto real beginning of the file
- e: edit repeat buffer
- j: jump back to last location
- p: put external file from save buffer
- r: restore repeat buffer
- s: print screen
- w: read in next page of file
- y: yank external file to save buffer
- /: cross buffer search
- n:p: set parameter 'p' to value 'n', parameters are:
- a: autoindent (1 means on, 0 off for all "switch" pars)
- c: "cut" mode (means 'dd' saves line in yank buffer, too)
- e: expand tabs to n spaces (8 default)
- d: home display line (where cursor homes after verify)
- f: find case mode (0 is case insensitive, 1 exact match)
- m: match wildcards (1 use ^A, ^L, etc., 0 no wild cards)
- o: requests new name for output file
- s: scroll window, cursor moves s lines before scrolling
- u: requests entry of user wild card set
- v: virtual window size
- w: autowrap limit.
- = r: replace next char with next character entered
- = ns: substitute: delete n characters, enter insert mode
- - t: Not implemented
- - u: Not implemented (see U)
- v: Unused
- * nw: advance word (see W)
- = nx: delete n characters
- * ny: yank text to save buffer - will save n lines into save buffer
- (Only one save buffer, 1st y clears buffer, rest add until
- non y command entered. dd works in a similar fashion, but
- kills as it saves (if cut_mode enabled)).
- = z: refresh screen (^L,^R)
- - {: Not implemented
- - |: Not implemented
- = n~: Change case of next n characters
- * nDEL: Same as X, delete previous character
-
-
-
-
-
- -37-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- EMAX - TVX emulating emacs
-
- Important differences: No windows, no marked region, no Q
- registers, no word delete or case change, ^K interacts differently
- with save buffer multiple keyboard macros (called repeat loops), much
- different file and buffer manipulation.
-
- Partial line ^K's (no argument or 0 argument) will save the
- deleted text in the unkill buffer (^CU), but NOT the save/cut buffer.
- If an argument is supplied, then the killed lines are save in the save
- buffer.
-
- TVX'x kill last thing concept is implemented as ^C^K.
-
- Values can be supplied in two ways. Any of the <esc> commands
- may supply a count after the <esc>. Thus, '<esc>10B' will back over
- 10 words. <esc> may also be used to specify the count for ctrl
- commands: '<esc>10^N' goes down 10 lines. The usual emacs '^U' also
- works to supply arguments. It works in the emacs multiples of 4, but
- the Arg: count echoes differently. When you press ^U, then the
- message 'Arg: 4' will appear on the bottom. If you press ^U again, it
- will change to 'Arg: 16'. However, if you enter any other numeric
- value, the 'Arg' message disappears, and you get no additional
- prompting of values.
-
-
- <ctrl-A> Move to start of line.
- n<ctrl-B> (Back) Move backward by characters.
- n<ctrl-C> (Command) TVX Command: execute commands provided
- by TVX base. (These ^C commands have NO relation
- to ^C commands of large emacs implemetations!)
- ^A Append line to save buffer
- ^B Move to absolute beginning of file
- ^E Edit repeat buffer
- ^F Fill n lines to autowrap margin
- ^G No op - exit ^C
- ^H Half screen down
- ^J Jump back to previous location
- ^K Delete last thing
- ^N Move to beginning of next line
- ^M Mark location n
- ^P Move to beginning of previous line
- ^R Restore edited repeat buffer
- ^W Write buffer, read next portion of file
- ; Search forward again
- ~ Change case of next n characters
- G Goto line number n
- H Half page up
- I Insert ascii char n if n supplied,
- otherwise enter insert mode
- L Print screen on printer (micros only)
- M Return to marked location
- P Put line into save buffer
- S Search forward across file buffers
- U Unkill last single line killed
- Vp Set variable p (like TVX's : command)
-
-
- -38-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- W Write save buffer to external file
- Y Yank external file into save buffer
- n<ctrl-D> (Delete) Delete next character.
- <ctrl-E> (End) Move to end of line.
- n<ctrl-F> (Forward) Move forward by characters.
- n<ctrl-H> Backspace - delete n previous characters
- n<ctrl-K> (Kill) With no argument, kill from current position
- to end of line; if at the end, kill the newline.
- With argument 0, kill from beginning of line to
- current position. Otherwise, kill argument lines
- forward (if positive) or backward (if negative).
- <ctrl-L> Redraw the screen.
- n<ctrl-N> (Next) Move to next line.
- n<ctrl-O> (Open) Open line above cursor.
- n<ctrl-P> (Previous) Move to previous line.
- <ctrl-R> (Reverse) search backward.
- <ctrl-S> (Search) search forward. { <Esc>S is a synonym }
- <ctrl-T> (Transpose) Transpose characters.
- <ctrl-U> Specify an argument, as described above.
- n<ctrl-V> Move forward by n pages.
-
- <ctrl-X><ctrl-C> Abort edit session with no changes.
- <ctrl-X><ctrl-B> Short buffer status line
- n<ctrl-X>E (Execute) Execute current repeat loop n times.
-
- <ctrl-Y> (Yank) Yank save buffer to current location.
- <ctrl-Z> Save current buffer to associated file and exit.
- n<Del> Delete the previous n characters. (^H is synonym)
-
- <esc>% Invoke command file (TVX @ file)
- <esc>! Call operating system
- n<esc>#p Execute repeat loop 'p' 'n' times.
- n<esc>( Repeat loop definition. ')<esc><esc>' ends loop.
- <esc>-,0-9 Auto argument for other <esc> and CTRL commands.
- <esc>< Move to beginning of buffer.
- <esc>> Move to end of buffer.
- <esc>? Help and status screens
- n<esc>B (Back) Move backward by words.
- n<esc>F (Forward) Move forward by words.
- n<esc>V Move backward by pages.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -39-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- *** INDEX ***
- TVX Reference Manual
-
- abort - 12
- append - 6, 12
- auto wrap - 19
- autoindent - 17
-
- backspace - 1, 2, 14, 20, 21
- backup file - 4, 6, 13, 20
- beginning of file - 6, 9
- buffer - 2, 6, 7, 9, 10, 12, 13
- buffer beginning - 6
-
- change - 7
- commands - 1, 6
- cursor - 1
- cursor character - 6
- cut mode - 17
-
- default source settings - 28
- define options - 29
- delete last thing - 14, 15
- delete line front - 15
- delete line tail - 15
- delete previous character - 14
- down - 7, 12
- down in column - 7
-
- end buffer - 7
- end session - 13
- Error Messages - 22
- escape - 6, 8, 9, 20
- exit - 13
- external file - 14
-
- find - 8, 9, 14, 18
- find case - 18
-
- get - 9
- get killed line - 9
-
- half page - 9
- home display line - 18
-
- insert - 9, 11
- Insert find pattern - 15
- Installation - 25
- Installation - MS-DOS - 30
- Installation - Unix - 31
- invoke command file - 17
-
- jump - 10
-
- kill characters - 10
- kill lines - 10
-
-
- -40-
-
-
-
-
- TVX Reference Manual 3/8/87
-
-
- left - 10
- line beginning - 15
- line end - 15
- log file - 4, 14, 17, 20
-
- memory - 10
- mode - 6, 7, 9, 11, 15
-
- note - 10, 11
-
- open line - 11
- operating system - 11
- other control sequences - 27
- output file - 18
-
- page - 9, 11
- parameters - 17
- print - 11
-
- Quick Reference Summary - 33
- quit - 7
-
- repeat buffer - 12
- repeat loop - 7, 16, 18
- right - 11
-
- save buffer - 6, 9, 12, 14
- scroll lines - 18
- search - 8
- skip over words - 15
- source code - 25
- starting up - 4
- status - 10
- switches - 5
-
- tab expansion - 18
- terminate - 12
- tidy - 12
- TVX File Usage - 32
-
- unkill - 9
- up - 13
- up in column - 13
- user wild cards - 18
-
- verify - 13
- virtual window - 18
-
- wild card - 8, 18
- word - 15
- write buffer - 13
-
- X-Y Cursor Addressing - 27
-
- yank external file - 14
-
-
-
- -41-
-
-
-
- ə